package edu.ustb.efws.pipeline.collect;

import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.List;

/**
 * 采集数据
 *
 * @author TS Group
 */
public class Collect {
    //设备编号
    private final int detId;
    //采集数据表名
    private final String colTableName;
    //设备类型
    private final Type type;
    //采集数据
    private final Object data;

    /**
     * 采集数据类型
     */
    public static enum Type {
        IPT,
        THOS,
        KYJ;
    }

    public Collect(int detId, String colTableName, Type type, Object data) {
        this.detId = detId;
        this.colTableName = colTableName;
        this.type = type;
        this.data = data;
    }

    public int getDetId() {
        return detId;
    }

    public String getColTableName() {
        return colTableName;
    }

    public Type getType() {
        return type;
    }

    public Object getData() {
        return data;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("detId", detId)
                .append("colTableName", colTableName)
                .append("type", type)
                .append("data", data)
                .toString();
    }
}
